﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities;
using System.Drawing;

namespace Line64.ImageFlow.Activities
{

    public sealed class UnloadBitmapActivity : CodeActivity
    {
        
        public InArgument<Bitmap> LoadedBitmap { get; set; }
        
        protected override void Execute(CodeActivityContext context)
        {

            Image loadedImage = this.LoadedBitmap.Get(context);

            if (loadedImage != null)
            {

                loadedImage.Dispose();

            }
            
        }

    }

}